$(function(){
	var width = window.innerWidth-200+"px";
	$("#home").css('width', width);
	var h = $("#nav").height();
	var height = window.innerHeight-h-2+"px";
	$("#home").css('height', height);
	$("#nav_left").css('height', height);
	
	$("#dhl").click(function(){
		if($(this).hasClass('closed')){
			$("#nav_left").animate({'margin-left' : '0px'});
			$(this).removeClass('closed');
			var obj = window.innerWidth-200+"px";
			$("#home").animate({'margin-left' : '200px', 'width': obj});
		}else{
			$(this).addClass('closed');
			$("#nav_left").animate({'margin-left' : '-200px'});
			var obj = window.innerWidth+"px";
			$("#home").animate({'margin-left' : '0px', 'width': obj});
		}
	});	
	
	$("p[src]").click(function(){
		var src = $(this).attr("src");
		$("#home").load(src);
	});
});
	
$(window).resize(function(){
	var width = window.innerWidth-220+"px";
	$("#home").css('width', width);
	var h = $("#nav").height();
	var height = window.innerHeight-h-2+"px";
	$("#home").css('height', height);
	$("#nav_left").css('height', height);
});
			